package com.cskaoyan.controller.wx.hx;

import com.cskaoyan.module.bean.BaseRespVo;
import com.cskaoyan.module.bean.bo.VXCommentListBO;
import com.cskaoyan.module.pojo.MarketComment;
import com.cskaoyan.service.wx.hx.VXCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 处理评论业务层
 * 创建日期: 2022/04/11 17:22
 *
 * @author Administrator
 */
@RestController
@RequestMapping("wx/comment")
public class VXCommentController {
    @Autowired
    VXCommentService vxCommentService;

    @GetMapping("list")
    public BaseRespVo list(VXCommentListBO vxCommentListBO){
        BaseRespVo baseRespVo = vxCommentService.commentList(vxCommentListBO);
        return baseRespVo;
    }
    @GetMapping("count")
    public BaseRespVo count(MarketComment marketComment){
        BaseRespVo baseRespVo = vxCommentService.countComment(marketComment);
        return baseRespVo;
    }
    @PostMapping("post")
    public BaseRespVo post(@RequestBody MarketComment marketComment){
        BaseRespVo baseRespVo = vxCommentService.postComment(marketComment);
        return baseRespVo;
    }

}
